<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap制作简单网站</title>
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <script src="../css/bootstrap.min.css"></script>
    <script src="../js/respond.min.js"></script>
    <style>
        body{
            margin: 50px 0;
            color: #5a5a5a;
        }
        .carousel{
            height: 500px;
        }
        .carousel .item{
            height: 500px;
            background-color: #000000;
        }
        .carousel .item img{
            width: 100%;
        }
        .carousel-caption p {
            font-size: 20px;
            line-height: 1.8;
        }
        #content{
            margin-top: 50px;
        }
        #content line{
            margin: 20px 0;
        }
        #download .col-lg-4{
            text-align: center;
        }
        /*标签页*/
        #tab-browers{
            padding-top: 20px;
        }
        #tab-browers h2{
            color: #7a85da;
            font-size:xx-large;
        }
        #tab-browers h2 span{
            font-size: x-large;
        }
        #foot{
            margin-top: 50px;
        }
        /*响应式布局*/
        @media (max-width: 768px) {
            .carousel{
                height: 300px;
            }
            .carousel .item{
                height: 300px;
                background-color: #000000;
            }
            .carousel .item img{
                min-height: 300px;
            }
            .carousel-caption p {
                  font-size: 16px;
                  line-height: 1.4;
            }
        }
    </style>
</head>
<body>
<!--顶部导航-->
<nav class="navbar navbar-default navbar-fixed-top" id="top-nav">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">切换样式</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">现代主流浏览器</a>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="active"><a href="#">综述</a></li>
                <li><a href="#">简述</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">特点<span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#label" data-target="tab-chrome">Chrome</a></li>
                        <li><a href="#label" data-target="tab-firefox">Firefox</a></li>
                        <li><a href="#label" data-target="tab-safari">Safari</a></li>
                        <li><a href="#label" data-target="tab-opera">Opera</a></li>
                        <li><a href="#label" data-target="tab-ie">IE</a></li>
                    </ul>
                </li>
                <li><a href="#" data-toggle="modal" data-target="#about-modal">关于</a></li>
            </ul>
        </div>
    </div>
</nav>
<!--轮播图-->
<div id="carousel-images" class="carousel slide" data-ride="carousel">
    <ol class="carousel-indicators">
        <li data-target="#carousel-images" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-images" data-slide-to="1"></li>
        <li data-target="#carousel-images" data-slide-to="2"></li>
        <li data-target="#carousel-images" data-slide-to="3"></li>
        <li data-target="#carousel-images" data-slide-to="4"></li>
    </ol>
    <div class="carousel-inner" role="listbox">
        <div class="item active">
            <img src="../img/firefox-big.jpg" alt="firefox">
            <div class="carousel-caption">
                <h1>firefox</h1>
                <p>Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。</p>
                <p><a class="btn btn-lg btn-danger" href="http://www.firefox.com.cn/download/"
                      role="button" target="_blank">点我下载</a>
                </p>
            </div>
        </div>
        <div class="item">
            <img src="../img/ie-big.jpg" alt="ie">
            <div class="carousel-caption">
                <h1>IE</h1>
                <p>Internet Explorer，简称 IE，是微软公司推出的一款网页浏览器。</p>
                <p><a class="btn btn-lg btn-danger" href="http://ie.microsoft.com/"
                      role="button" target="_blank">点我下载</a>
                </p>
            </div>
        </div>
        <div class="item">
            <img src="../img/opera-big.jpg" alt="opera">
            <div class="carousel-caption">
                <h1>Opera</h1>
                <p>Opera浏览器，是一款挪威Opera Software ASA公司制作的支持多页面标签式浏览的网络浏览器。</p>
                <p><a class="btn btn-lg btn-danger" href="http://www.opera.com/zh-cn"
                      role="button" target="_blank">点我下载</a>
                </p>
            </div>
        </div>
        <div class="item">
            <img src="../img/chrome-big.jpg" alt="chrome">
            <div class="carousel-caption">
                <h1>Chrome</h1>
                <p>Google Chrome，又称Google浏览器，是一个由Google（谷歌）公司开发的网页浏览器。</p>
                <p><a class="btn btn-lg btn-danger" href="http://www.google.cn/intl/zh-CN/chrome/browser/"
                      role="button" target="_blank">点我下载</a>
                </p>
            </div>
        </div>
        <div class="item">
            <img src="../img/safari-big.jpg" alt="chrome">
            <div class="carousel-caption">
                <h1>Safari</h1>
                <p>Safari，是苹果计算机的最新操作系统Mac OS X中的浏览器。</p>
                <p><a class="btn btn-lg btn-danger" href="http://www.apple.com/cn/safari/"
                      role="button" target="_blank">点我下载</a>
                </p>
            </div>
        </div>
    </div>
    <a class="left carousel-control" href="#carousel-images" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-images" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
</div>
<!--内容-->
<!--下载-->
<div class="container" id="content">
    <div class="row" id="download">
        <div class="col-lg-4">
            <img src="../img/chrome-logo-small.jpg" alt="chrome" class="img-circle">
            <h2>chrome</h2>
            <p>Google Chrome，又称Google浏览器，是一个由Google（谷歌）公司开发的网页浏览器。</p>
            <p><a href="#" class="btn btn-primary">点击下载</a></p>
        </div>
        <div class="col-lg-4">
            <img class="img-circle" src="../img/safari-logo-small.jpg" alt="safari">
            <h2>Safari</h2>
            <p>Safari，是苹果计算机的最新操作系统Mac OS X中的浏览器。</p>
            <p><a class="btn btn-primary" href="#" role="button">点我下载</a></p>
        </div>
        <div class="col-lg-4">
            <img class="img-circle" src="../img/firefox-logo-small.jpg" alt="firefox">
            <h2>Firefox</h2>
            <p>Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器。</p>
            <p><a class="btn btn-primary" href="#" role="button">点我下载</a></p>
        </div>
    </div>
    <hr class="line">
    <!--标签页-->
    <div id="label">
        <ul class="nav nav-tabs" role="tablist" id="tablist">
            <li role="presentation" class="active"><a href="#tab-chrome" role="tab" data-toggle="tab">Chrome</a></li>
            <li role="presentation"><a href="#tab-firefox" role="tab" data-toggle="tab">Firefox</a></li>
            <li role="presentation"><a href="#tab-safari" role="tab" data-toggle="tab">Safari</a></li>
            <li role="presentation"><a href="#tab-opera" role="tab" data-toggle="tab">Opera</a></li>
            <li role="presentation"><a href="#tab-ie" role="tab" data-toggle="tab">IE</a></li>
        </ul>
        <div class="tab-content" id="tab-browers">
            <div role="tabpanel" class="tab-pane active" id="tab-chrome">
                <div class="row">
                    <div class="col-md-7">
                        <h2 class="feature-heading">
                            Google Chrome <span class="text-muted">使用最广的浏览器</span>
                        </h2>
                        <p class="lead">
                            Google Chrome，又称Google浏览器，是一个由Google（谷歌）公司开发的网页浏览器。该浏览器是基于其他开源软件所撰写，包括WebKit，目标是提升稳定性、速度和安全性，并创造出简单且有效率的使用者界面。
                        </p>
                    </div>
                    <div class="col-md-5">
                        <img class="feature-image img-responsive" src="../img/chrome-logo.jpg"alt="Chrome">
                    </div>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="tab-firefox">
                <div class="row">
                    <div class="col-md-5">
                        <img class="feature-image img-responsive" src="../img/firefox-logo.jpg" alt="Firefox">
                    </div>
                    <div class="col-md-7">
                        <h2 class="feature-heading">
                            Mozilla Firefox <span class="text-muted">美丽的狐狸</span>
                        </h2>

                        <p class="lead">
                            Mozilla Firefox，中文名通常称为“火狐”或“火狐浏览器”，是一个开源网页浏览器，使用Gecko引擎（非ie内核），支持多种操作系统如Windows、Mac和linux。
                        </p>
                    </div>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="tab-safari">
                <div class="row">
                    <div class="col-md-7">
                        <h2 class="feature-heading">
                            Safari <span class="text-muted">Mac用户首选</span>
                        </h2>
                        <p class="lead">
                            Safari，是苹果计算机的最新操作系统Mac OS X中的浏览器，使用了KDE的KHTML作为浏览器的运算核心。Safari在2003年1月7日首度发行测试版，并成为Mac OS X v10.3与之后的默认浏览器，也是iPhone与IPAD和iPod touch的指定浏览器。
                        </p>
                    </div>
                    <div class="col-md-5">
                        <img class="feature-image img-responsive" src="../img/safari-logo.jpg" alt="Safari">
                    </div>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="tab-opera">
                <div class="row feature">
                    <div class="col-md-5">
                        <img class="feature-image img-responsive" src="../img/opera-logo.jpg" alt="Opera">
                    </div>
                    <div class="col-md-7">
                        <h2 class="feature-heading">
                            Opera <span class="text-muted">小众但易用</span>
                        </h2>
                        <p class="lead">Opera浏览器，是一款挪威Opera Software ASA公司制作的支持多页面标签式浏览的网络浏览器。是跨平台浏览器可以在Windows、Mac和Linux三个操作系统平台上运行。.
                        </p>
                    </div>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="tab-ie">
                <div class="row feature">
                    <div class="col-md-7">
                        <h2 class="feature-heading">
                            IE <span class="text-muted">你懂的</span>
                        </h2>
                        <p class="lead">
                            Internet Explorer，原称Microsoft Internet Explorer(6版本以前)和Windows Internet Explorer(7，8，9，10版本)，简称IE，是美国微软公司推出的一款网页浏览器。它采用的排版引擎(俗称内核)为Trident。</p>
                    </div>
                    <div class="col-md-5">
                        <img class="feature-image img-responsive" src="../img/ie-logo.jpg" alt="IE">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <hr class="line">
    <footer id="foot">
        <p class="pull-right">
            <a href="#">
                回到顶部 <span class="glyphicon glyphicon-open"></span>
            </a>
        </p>
        <p class="pull-left">
          友情链接：<a href="http://v3.bootcss.com/">bootstrap官网</a>&nbsp;&nbsp;
            <a href="http://www.imooc.com/">慕课网</a>&nbsp;&nbsp;
            <a href="https://www.microsoft.com/zh-cn/">IE</a>&nbsp;&nbsp;
            <a href="http://www.google.cn/chrome/browser/desktop/index.html">Chrome</a>&nbsp;&nbsp;
            <a href="http://www.firefox.com.cn/">Firefox</a>&nbsp;&nbsp;
            <a href="https://www.apple.com/cn/safari/">Safari</a>&nbsp;&nbsp;
            <a href="http://www.opera.com/zh-cn">Opera</a>
        </p>
    </footer>
</div>
<!--弹出框-->
<div class="modal fade" tabindex="-1" role="dialog" id="about-modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">关于</h4>
            </div>
            <div class="modal-body">
                <p>这是一个神奇的网站！</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">知道了</button>
            </div>
        </div>
    </div>
</div>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script>
    $(function () {
        $('#top-nav .navbar-collapse .dropdown-menu a').click(
            function () {
                var href = $(this).attr("href");
                var tabId = $(this).attr("data-target");
                if ("#" !== href){
                    console.log(tabId);
                    if (tabId) {
                        $('#label a[href="#' + tabId + '"]').tab('show');
                    }
                }
            }
        );
    })
</script>
</body>
</html>